package com.stone.framework.message.basic.param;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

import io.swagger.annotations.ApiModelProperty;

public class BusinessParamReqBody {

    @ApiModelProperty(value = "主键，新增时不使用")
    private Long id;

    @ApiModelProperty(value = "代码", required = true)
    @NotBlank(message = "[key] {title.notBlank}")
    private String key;

    @ApiModelProperty(value = "名称", required = true)
    @NotBlank(message = "[value] {title.notBlank}")
    private String value;

    @ApiModelProperty(value = "描述", required = true)
    @NotBlank(message = "[desc] {title.notBlank}")
    private String desc;

    @ApiModelProperty(value = "状态（DISABLED|ENABLED）", required = true)
    @NotNull(message = "[state] {title.notNull}")
    @Pattern(regexp = "(DISABLED|ENABLED)", message = "[state] must be 'DISABLED|ENABLED'")
    private String state;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

}
